  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="admin" />
        <script src="../../js/grum.js" type="text/javascript" />
        <title>Manage Group Users</title>
    </head>
    <body>
		<div id="center-column">
			<div class="top-bar">
				<g:link class="button" action="create">ADD NEW</g:link>
				<h1>Manage Group Users</h1>
				<div class="breadcrumbs">
					<a class="home" href="${resource(dir:'')}">Home</a> / 
					<g:link class="list" action="list">Group List</g:link> /
					<g:link class="create" action="create">New Group</g:link>
				</div>
			</div><br />
			<div class="select-bar-border-no"></div>
	        <div class="body">
	            <g:form name="frmAddUsers" method="post" onsubmit="selectAllOptions('Group.users');">
	                <input type="hidden" name="id" value="${group?.id}" />
		            <div class="dialog" style="width:285px">
			            <div class="subdialog">
			            	<h2>Available Users</h2>
							<g:select name="availableUsers"
									  id="availableUsers"
							          from="${availableUsers}"
							          value="${user?.id}"
							          optionKey="id" 
							          multiple="multiple"
							          size="5" />
		                </div>
		            </div>
		            <div style="float:left;vertical-align: middle; padding: 1px; padding-top: 15px; width: 30px; text-align: center">
					   <input value="&gt;" type="button" onclick="moveSelectedOptions('availableUsers', 'Group.users');" />
					   <input value="&gt;&gt;" type="button" onclick="moveAllOptions('availableUsers', 'Group.users');" />
					   <input value="&lt;" type="button" onclick="moveSelectedOptions('Group.users', 'availableUsers');" />
					   <input value="&lt;&lt;" type="button" onclick="moveAllOptions('Group.users', 'availableUsers');" />
					</div>
		            <div class="dialog" style="width:285px">
			            <div class="subdialog">
			            	<h2>Group: ${group?.name?.encodeAsHTML()}</h2>
							<g:select name="Group.users"
									  id="Group.users"
							          from="${users}"
							          value="${user?.id}"
							          optionKey="id" 
							          multiple="multiple"
							          size="5" />
			            </div>
		            </div>
	                <div class="buttons">
	                    <span class="button"><g:actionSubmit class="save" value="Update" action="updateGroupUsers"/></span>
	                </div>
	            </g:form>
	        </div>
	    </div>
		<div id="right-column">
            <g:if test="${flash.message}">
				<strong class="h">INFO</strong>
	            <div class="box">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${group}">
				<strong class="h">ERROR</strong>
                <g:renderErrors bean="${group}" as="list" />
            </g:hasErrors>
		</div>
    </body>
</html>
